package com.zbkj.crmeb.enums;

/**
 * 酒庄类型（1海外酒庄 2海外酒商 3国内酒商 4港澳酒商）
 * @date 2020/9/28 18:58
 */
public enum WineryTypeEnum {
    OVERSEAS_WINERY(1,"海外酒庄"),

    OVERSEAS_MARKET(2,"海外酒商"),

    CHINESE_MAINLAND(3, "大陆酒商"),

    HONGKONG_MACAO(4, "港澳酒商");

    Integer type;

    String typeName;

    public Integer getType() {
        return type;
    }

    public String getTypeName() {
        return typeName;
    }

    private WineryTypeEnum(Integer type, String typeName){
        this.type = type;
        this.typeName = typeName;
    }
    public static WineryTypeEnum getTypeByCode(Integer type){
        if(type != null){
            for(WineryTypeEnum val : WineryTypeEnum.values()){
                if(val.type.equals(type)){
                    return val;
                }
            }
        }
        return OVERSEAS_WINERY;
    }
}
